<%@ page import="TeachLesson.Res.ResDao" %>
<%@ page import="TeachLesson.Res.ResEnity" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/27
  Time: 9:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>相关资料</title>
    <link href="/SystemerNav/SystemerNav.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body background="/LoginInterface/loginFace.jpg">
<div class="container">
    <div class="top">
        <table class="table table-hover">
            <tr>
                <td>文件名</td>
                <td>下载</td>
            </tr>
            <%//遍历文件
                String workerNo=request.getParameter("workerNo");
                String courseNo=request.getParameter("courseNo");
                String dirName=request.getParameter("dirName");
                String point=request.getParameter("point");

                String fileRoot="F:\\JWGLXT\\web\\StoreResoures\\"+workerNo+"\\"+courseNo+"\\"+dirName+"\\"+point;
                ResDao resDao=new ResDao();
                ArrayList<ResEnity> list=resDao.getRes(fileRoot);

                for (ResEnity temp:list){

            %>

            <tr>
                <td><%=temp.getFileName()%></td>
                <td>
                    <form action="/TeachLesson/downloadResServlet">
                        <input type="hidden" name="id" value="<%=temp.getId()%>">
                        <button type="submit" class="btn btn-success">下载</button>
                    </form>
                </td>
            </tr>
            <%
                }%>
        </table>
    </div>
</div>
</body>
</html>
